package com.mes.service.lc;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mes.dao.lc.CheckStockDetailMapper;
import com.mes.dao.lc.CheckStockMapper;
import com.mes.entity.lc.CheckStock;
import com.mes.entity.lc.CheckStockDetail;
import com.mes.entity.lc.MaterialStock;
import com.mes.service.lc.CheckStockService;

/**
 * 盘点接口实现
 * @author Administrator
 *
 */
@Service
public class CheckStockServiceImpl implements CheckStockService {
	
	@Autowired
	CheckStockMapper	checkStockMapper;//盘点单
	@Autowired
	CheckStockDetailMapper	checkStockDetailMapper;//盘点详情
	@Override
	
	/**
	 * 盘点单分页查询
	 * @param checkStock
	 * @return
	 */
	public List<CheckStock> selectfycs(CheckStock checkStock) {
		return checkStockMapper.selectfycs(checkStock);
	}
	
	/**
	 * 盘点单分页查询总数
	 * @param checkStock
	 * @return
	 */
	@Override
	public int selectfycscont(CheckStock checkStock) {
		return checkStockMapper.selectfycscont(checkStock);
	}
	
	/**
	 * 添加盘点单
	 * @param checkStock
	 * @return
	 */
	@Override
	public Integer addpdd(CheckStock checkStock) {
		 return checkStockMapper.addpdd(checkStock);
	}

	/**
	 * 删除盘点单
	 * @param checkStock
	 */
	@Override
	public void deletepdd(CheckStock checkStock) {
		 checkStockMapper.deletepdd(checkStock);
	}

	/**
	 * 添加盘点单详情
	 */
	@Override
	public void addCheckStockDetail(CheckStockDetail csd) {
		checkStockDetailMapper.addCheckStockDetail(csd);
	}

	/**
	 * 盘点单详情查询
	 */
	@Override
	public List<CheckStockDetail> selectfycsc(CheckStockDetail checkStockDetail) {
		return checkStockDetailMapper.selectfycsc(checkStockDetail);
	}

	/**
	 * 盘点单详情总数查询
	 */
	@Override
	public Integer selectfycsccont(CheckStockDetail checkStockDetail) {
		return checkStockDetailMapper.selectfycsccont(checkStockDetail);
	}

	/**
	 * 盘点单详情修改
	 */
	@Override
	public void updatexiangq(CheckStockDetail checkStockDetail) {
		checkStockDetailMapper.updatexiangq(checkStockDetail);
	}

	/**
	 * 根据主键查询盘点单
	 */
	@Override
	public CheckStock selectPanid(Long id) {
		return checkStockMapper.selectPanid(id);
	}

	/**
	 * 盘点单修改
	 * @param checkStock
	 */
	@Override
	public void updatepdd(CheckStock checkStock) {
		checkStockMapper.updatepdd(checkStock);
		
	}


}
